package com.globallogic.oopbasics.competence.entity;

import com.globallogic.oopbasics.competence.exception.LevelException;

/**
 * @author olena.strelchuk
 */

public class PersonalCompetency extends AbstractCompetency {

	private static final String PARAM_EVALUATION_LEVEL = "Evaluation level";

	/**
	 * Constructor for PersonalCompetency
	 */
	public PersonalCompetency(int id, String name, double globalValue)
			throws LevelException {
		super(id, name, globalValue);

		addParam(PARAM_EVALUATION_LEVEL);

		if ((globalValue < 0) || (globalValue > 1)) {
			throw new LevelException(globalValue);
		}
	}
}